/* 
 * File:   Client.h
 * Author: pson
 *
 * Created on May 31, 2011, 10:52 AM
 */

#ifndef NRPSTG_CLIENT_H
#define	NRPSTG_CLIENT_H

#include <istream>

using namespace std;

class Chunk;

class Client {
private:
    unsigned int size_buf;
    enum CELL_STATE {
        TERRAIN = 1,
        FILL = 2,
        CONNECT = 3,
        INVALID = 4
    };
    static const int REPEAT = 255;
    static const int NEXT = 254;
    
public:
    Client();
    virtual ~Client();

    /*
     * Uses the input stream to load in data for a chunk
     * Returns a success code
     */
    int load_chunk(istream* in, Chunk* chunk);
};

#endif	/* NRPSTG_CLIENT_H */

